package com.greenold.Visit.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.greenold.common.annotation.Excel;
import com.greenold.common.core.domain.BaseEntity;

/**
 * 来访登记对象 visit_registration
 * 
 * @author ruoyi
 * @date 2025-10-13
 */
@Data
public class VisitRegistration extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    // 新增：查询用的时间范围字段
    private String beginVisitTime;  // 注意类型与前端传递的格式匹配（如String类型接收"YYYY-MM-DD"）
    private String endVisitTime;

    // 新增字段的getter/setter（必须添加，否则MyBatis无法获取值）
    public String getBeginVisitTime() {
        return beginVisitTime;
    }
    public void setBeginVisitTime(String beginVisitTime) {
        this.beginVisitTime = beginVisitTime;
    }
    public String getEndVisitTime() {
        return endVisitTime;
    }
    public void setEndVisitTime(String endVisitTime) {
        this.endVisitTime = endVisitTime;
    }
    /** 序号 */
    @Excel(name = "序号")
    private Long id;

    /** 预约类型（0：参观预约，1：探访预约） */
    @Excel(name = "预约类型", readConverterExp = "0=参观预约，1=探访预约")
    private String visitType;

    /** 来访人姓名 */
    @Excel(name = "来访人姓名")
    private String visitorName;

    /** 来访人手机号（11位数字） */
    @Excel(name = "来访人手机号", readConverterExp = "11位数字")
    private String phone;

    /** 老人姓名 */
    @Excel(name = "老人姓名")
    private Long elderlyId;
    /** 老人姓名 */
    @Excel(name = "老人姓名")
    private String elderName;

    /** 来访时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "来访时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date visitTime;

    /** 创建人 */
    @Excel(name = "创建人")
    private String creator;
    /** 额外老人姓名 */
    @Excel(name = "额外老人姓名")
    private String extend2;
    /** 用户名 */
    @Excel(name = "用户名")
    private String userName;


    public void setExtend2(String extend2)
    {
        this.extend2 = extend2;
    }

    public String getExtend2()
    {
        return extend2;
    }

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setVisitType(String visitType) 
    {
        this.visitType = visitType;
    }

    public String getVisitType() 
    {
        return visitType;
    }

    public void setVisitorName(String visitorName) 
    {
        this.visitorName = visitorName;
    }

    public String getVisitorName() 
    {
        return visitorName;
    }

    public void setPhone(String phone) 
    {
        this.phone = phone;
    }

    public String getPhone() 
    {
        return phone;
    }

    public void setElderlyId(Long elderlyId) 
    {
        this.elderlyId = elderlyId;
    }

    public Long getElderlyId() 
    {
        return elderlyId;
    }

    public void setVisitTime(Date visitTime) 
    {
        this.visitTime = visitTime;
    }

    public Date getVisitTime() 
    {
        return visitTime;
    }

    public void setCreator(String creator) 
    {
        this.creator = creator;
    }

    public String getCreator() 
    {
        return creator;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("visitType", getVisitType())
            .append("visitorName", getVisitorName())
            .append("phone", getPhone())
            .append("elderlyId", getElderlyId())
            .append("visitTime", getVisitTime())
            .append("creator", getCreator())
            .append("createTime", getCreateTime())
            .toString();
    }
}
